package com.htjx.mall.commons.models;

public class CommonBean {
	private long id;
	private int index;
	private String name;
	private String description;
	private Object body;
	
	public CommonBean() {
		super();
	}
	
	public CommonBean(int index, String name, String description) {
		
		this.index = index;
		this.name = name;
		this.description = description;
	}
	
	public CommonBean(String name, String description) {
		super();
		this.name = name;
		this.description = description;
	}
	
	public CommonBean(int index, String name) {
		super();
		this.index = index;
		this.name = name;
	}
	
	public CommonBean(long id, String name) {
		super();
		this.id = id;
		this.name = name;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public int getIndex() {
		return index;
	}
	public void setIndex(int index) {
		this.index = index;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}

	public Object getBody() {
		return body;
	}

	public void setBody(Object body) {
		this.body = body;
	}
	
	@SuppressWarnings("unchecked")
	public <T> T getBody(Class<T> clazz) {
		//JSONObject obj = (JSONObject) this.body;
		//return JSON.parseObject(obj.toJSONString(), clazz);
		return (T) body;
	}
}
